import request from '@/utils/request';
const basepath = '/appsys/cache/commonloader/clearCache';
export type Direction = 'user' | 'other' | 'auth' | 'all';

/**
 * 根据类型刷新缓存
 * @param parma
 */
export function refreshCache(parma: Direction) {
  return request.get(`${basepath}/${parma}`);
}

/**
 * 刷新流程缓存
 */
export function refreshProcessCache() {
  return request.get('/bpm/AppProcessPublishManageRest/processEngineLoad/v1');
}
